﻿@page
@model Web.Pages.Product.MagicModel
@{
    ViewData["Title"] = "Magic";
}

<button type="button" class="layui-btn" id="upfile">
    <i class="layui-icon layui-icon-file"></i>上传文件
</button>

@section Scripts{
    <script>
        layui.use(['upload'], function () {
            var upload = layui.upload;

            var uploadInst = upload.render({
                elem: '#upfile' //绑定元素
                , url: '/Api/File/?appid=31056ef11c1d4b408f169b1cecb0a9d2' //上传接口
                , exts: 'zip'
                , done: function (res) {
                    //上传完毕回调
                }
                , error: function () {
                    //请求异常回调
                }
            });
        });
    </script>
}


